package com.culturalCenter.dataCenter.globalconfig.exception;


import com.culturalCenter.dataCenter.Utils.ResultCode;

/**
 * @author : child
 * @date : 2020-7-23 10:57:06
 * Description：自定义异常
 */
public class ElegantException extends RuntimeException {

    private String code;

    public ElegantException(ResultCode resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public ElegantException(ResultCode resultEnum, String message) {
        super(message);
        this.code = resultEnum.getCode();
    }

    public ElegantException(String code, String message) {
        super(message);
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

}
